/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.edu.amu.wmi.kino.visualjavafx.javafxcodegenerators.object;


import pl.edu.amu.wmi.kino.visualjavafx.javafxcodegenerators.helpergenerators.EndGenerator;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.shapes.Circle;

/**
 *
 * @author Admin
 */

//TODO : Grzegorz : Polygon and Polyline bounding rectangle anchorX anchorY
public class CircleGenerator extends EllipseGenerator{

    @Override
    public boolean canGenerate(Object o){
        if(o instanceof Circle) return true;
        else return false;
    }


    @Override
    public void generateUniqueAttributes(StringBuilder sb,Object o,int recursionLevel){
        Circle c=(Circle)o;
        sb.append("cx:"+c.getHPos()+";\n");
        sb.append("cy:"+c.getVPos()+";\n");
        sb.append("radius:"+c.getRadious()+";\n");
    }
    @Override
    public void generateStart(StringBuilder sb){
        sb.append("SuperCircle{\n");
    }

     @Override
    public void generateEnd(StringBuilder sb) {
        EndGenerator.generateEnd(sb);
    }


   

   
}
